package com.vcredit.creditcat.manager;

import com.alibaba.dubbo.config.annotation.Service;
import com.vcredit.creditcat.api.ICheckLoginManager;
import com.vcredit.creditcat.model.LoginLog;
import com.vcredit.creditcat.service.LoginLogService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by liaoshengjun on 2017/7/25.
 */
@Service(protocol = { "protocol1" }, version = "1.0")
public class CheckLoginManager implements ICheckLoginManager{
	@Autowired
	private LoginLogService loginLogService;

	@Override
	public boolean checkLogin(String token) {
		// TODO Auto-generated method stub		
		List<LoginLog> list= (List<LoginLog>) loginLogService.findCheckLogin(token);
		if(null==list||list.size()==0){
			return false;
		}		
		return true;
	}

	
}
